Skip to content

Fixed the garbage _tx_initialize_unused_memory in the GNU Cortex-A ports - #726

Merged
fdesbiens merged 1 commit into
eclipse-threadx:devfrom
fdesbiens:fix/issue-435
Sep 15, 2026
Merged

fdesbiens merged 1 commit into
eclipse-threadx:devfrom
fdesbiens:fix/issue-435

Conversation

@fdesbiens

@fdesbiens fdesbiens commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Fixes #435

LDR x1, =__top_of_ram already loads the top of RAM, so the LDR x1, [x1]
that followed read whatever sat at that address and left
_tx_initialize_unused_memory holding garbage.

Dropped that instruction from the 13 non-SMP GNU Cortex-A ports, the ARMv8-A
source they are generated from, and the two Cortex-A35 module examples. The SMP
GNU ports already had the correct form, and the Arm Compiler ports are
unaffected -- their symbol really does need the dereference.

scripts/check_ports.sh passes and the gnu CI job build-verifies the AArch64
ports. Not run on hardware.

…level initialization, so _tx_initialize_unused_memory now holds the first free address instead of garbage

__top_of_ram is a linker-defined symbol whose address is the value of
interest, so LDR x1, =__top_of_ram already loads the top of RAM. The
following LDR x1, [x1] read whatever happened to be stored there and
handed that garbage to _tx_initialize_unused_memory.

The Arm Compiler ports are not affected: they load a literal .quad that
holds the address, so the dereference is correct there. The SMP GNU
ports already had the correct form; this aligns the remaining GNU ports
with them.

Assisted-by: Copilot (Opus 5) <noreply@github.com>
@fdesbiens fdesbiens changed the title Removed the extra dereference of __top_of_ram in the GNU ARMv8-A low-level initialization, so _tx_initialize_unused_memory now holds the first free address instead of garbage Fixed the garbage _tx_initialize_unused_memory in the GNU Cortex-A ports Sep 15, 2026
@fdesbiens
fdesbiens merged commit 5d235a5 into eclipse-threadx:dev Sep 15, 2026
14 checks passed
@fdesbiens
fdesbiens deleted the fix/issue-435 branch September 16, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant